<?php
 
//$base = 'https://api.hasoffers.com/Api?';
//$base='http://api.hasoffers.com/v3/Offer.json?';
$base='https://api.hasoffers.com/v3/Offer.json?Method=findAllIds&NetworkToken=ff289efb7fd0d8ce4cd6a51474a1d0eb717af6e5d3515b952c6844d8c55ef83e&NetworkId=appflood';
$base='http://api.hasoffers.com/v3/Affiliate_Offer.json?Method=findMyOffers&api_key=e74468e09bed8841fe7578057b72e3ec65ead872f79a678f10f5530b1269f6da&NetworkId=appflood';
//$base='http://api.hasoffers.com/v3/Affiliate_Report.json?Method=getStats&api_key=ff289efb7fd0d8ce4cd6a51474a1d0eb717af6e5d3515b952c6844d8c55ef83e&NetworkId=appflood&limit=0&fields[]=Stat.offer_id&fields[]=Stat.conversions&fields[]=Stat.clicks&fields[]=Stat.payout&filters[Stat.offer_id][conditional]=EQUAL_TO&filters[Stat.offer_id][values][]='.$offer.'&filters[Stat.date][conditional]=BETWEEN&filters[Stat.date][values][]='.$date.'&filters[Stat.date][values][]='.$date.'&groups[]=Stat.offer_id&groups[]=Stat.hour&data_start='.$date.'&data_end='.$date.'&hour_offset=-10&field[]=Stat.conversions&field[]=Stat.clicks&field[]=Stat.payout&timestamp=Stat.hour';
/*$params = array(
	'Format' => 'json'
	,'Target' => 'Application'
	,'Method' => 'findAllIds'
	,'Service' => 'HasOffers'
	,'Version' => 3
	,'NetworkId' => 'appflood'
	,'NetworkToken' => 'ff289efb7fd0d8ce4cd6a51474a1d0eb717af6e5d3515b952c6844d8c55ef83e'
	,'api_key' => 'ff289efb7fd0d8ce4cd6a51474a1d0eb717af6e5d3515b952c6844d8c55ef83e'
);*/
/*$base = 'https://api.hasoffers.com/v3/Offer.json?';
 
$params = array(
	'Format' => 'json'
	,'Target' => 'AffiliateUser'
	,'Method' => 'findAllIds'
	,'Service' => 'HasOffers'
	,'Version' => 3
	,'NetworkId' => 'appflood'
	,'NetworkToken' => 'e74468e09bed8841fe7578057b72e3ec65ead872f79a678f10f5530b1269f6da'
);*/
 
$url = $base ;//. http_build_query( $params );
 
$result = file_get_contents( $url );
 
echo '<pre>';
print_r( json_decode( $result ) );
echo '</pre>';
?>